package com._21cn._front.utils.uc;

import com.uctoutiao.openapi.sdk.biz.ChannelsRequest;
import com.uctoutiao.openapi.sdk.response.ChannelsResponse;
import org.springframework.stereotype.Component;

@Component("ucArticleHelper")
public class UcArticleHelper {

    public static void getChannels(){
        try {
            ChannelsRequest req = new ChannelsRequest(AppConfig.APP_NAME, AppConfig.DN);
            ChannelsResponse response = req.getChannels(AppConfig.ACCESS_TOKEN, null);
            System.out.println(response);
        }catch (Exception e){
            e.printStackTrace();
        }
    }

    public static void main(String[] args) {
        getChannels();
    }
}
